<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition 
	template="/administration/general/templates/template.xhtml">
	<ui:define name="content">
	    <h:form>
			<h:messages style="color:red;"></h:messages>
			<h:outputText value="Listado de Establecimientos"></h:outputText>
			  <h:dataTable value="#{list_Establishment.establishments}" var="establishments"
				styleClass="order-table" headerClass="order-table-header"
				rowClasses="order-table-odd-row,order-table-even-row">
				<h:column rendered="false">
					<f:facet name="header">id del establecimiento</f:facet>
    				#{establishments.id}
    			</h:column>
				<h:column>
					<f:facet name="header">Nombre del Establecimiento</f:facet>
    				#{establishments.nameEstablishment}
    			</h:column>
				<h:column>
					<f:facet name="header">Gerente del establacimiento</f:facet>
    				#{establishments.managerName}
    			</h:column>
    			<h:column>
					<f:facet name="header">Nombre de la marca</f:facet>
    				#{establishments.brand.brandName}
    			</h:column>
    			<h:column>
					<f:facet name="header">Estado</f:facet>
    				#{establishments.status}
    			</h:column>
				<h:column>
					<f:facet name="header">Opciones</f:facet>
					<h:commandButton action="#{edit_establishments.loadEdit}" value="Editar">
						<f:param name="establishmentid" value="#{establishments.id}"/>
					</h:commandButton>
				</h:column>
			</h:dataTable>
			<h:commandButton value="Crear nuevo Establecimiento" action="#{edit_establishments.loadCreate}"></h:commandButton>
		</h:form>
	</ui:define>
</ui:composition>
</html>	